using System;
using System.Collections.Generic;
using System.Text;

namespace HexterConsulting
{
    class Category
    {
        private string _name;
        private System.Collections.ArrayList _instances= new System.Collections.ArrayList();
        private System.Collections.ArrayList _servers= new System.Collections.ArrayList();
        private System.Collections.ArrayList _counterNames= new System.Collections.ArrayList();
        public Category(string Name)
        {
            _name = Name;
        }
        public void AddInstance(string InstanceName)
        {
            if (!_instances.Contains(InstanceName))
            {
                _instances.Add(InstanceName);
            }
        }
        public void AddMachine(string MachineName)
        {
            if (!_servers.Contains(MachineName))
            {
                _servers.Add(MachineName);
            }
        }
        public void AddCounter(string CounterName)
        {
            if (!_counterNames.Contains(CounterName))
            {
                _counterNames.Add(CounterName);
            }
        }
        public string Name
        {
            get
            {
                return this._name;
            }
        }
        public string[] MachineNames
        {
            get
            {
                return (string[])_servers.ToArray(typeof(string));
            }
        }
        public string[] InstanceNames
        {
            get
            {
                return (string[])_instances.ToArray(typeof(string));
            }
        }
        public string[] CounterNames
        {
            get
            {
                return (string[])_counterNames.ToArray(typeof(string));
            }
        }


    }
}
